Repository navigation
Conversation
The modal template and its parameter list now accept color and visible. color applies a Tabler background and the same contrasting foreground used by a colored toast to the header only, mapping white to the light foreground and adding text-reset on the title; an empty or omitted color adds no classes, and the body and footer are left alone. visible sets data-modal-visible and does not emit a script. Client init then shows the last marked modal through Bootstrap unless the URL hash already names a different modal, removes every marker so a later fragment load does not open an earlier dialog or reopen one the user closed, and leaves the address unchanged. Fixes sqlpage#1258
Keep the header color classes with close_label from main, update the visible modal code for the removed ModalWidget type, and move the visible and color scenarios to a modal-visible fixture so the modal fixture from main keeps its own page. Main now announces each moved modal synchronously, which reran the visible check and opened a dialog that was then moved mid-transition and stayed hidden. Move every modal before announcing any of them.
Resolve the CHANGELOG conflict by keeping the modal entry under "unreleased" above the new v0.48.0 section.
|
Merged main into this branch in 1f8138f to resolve the CHANGELOG conflict after the v0.48.0 cut, keeping the modal entry under unreleased. The |
|
Merged main again in 92f7fe3 to clear the new CHANGELOG conflict from the v0.48.0 date change: the modal entry stays under unreleased and the release heading now reads 2026-11-12. No code changed. |
|
Merged main in 0f742d4 to clear the CHANGELOG conflict with the big_number |
lovasoa
left a comment
There was a problem hiding this comment.
Hello ! Sorry for the delay, I finally got around to testing this.
No comment on the visible addition, I'm ready to merge it as-is now if you split it out.
For the color, I'm not sure about a color option that only changes the color of the header, and has a hardcoded special case for "white". Why not coloring the entire modal ?
|
Thanks for testing it. I kept the color on the header because the body can hold any component (forms, tables, cards), and those don't adapt to a colored background, so a green or red body would hurt readability. The "white" special case was there to give a white header a readable foreground. It is a hack, I agree.
|
|
I think you need to experiment to find a way to set color that visually looks good, is useful, and is coherent with the rest of SQLPage components. For visible if you split it out in a different PR I'll merge it now. |
The modal template and its parameter list now accept color and visible. A modal could not be given a header color, and it stayed closed when the page loaded.
Tests for this live in
tests/end-to-end/fixtures/modal-visible/index.sqlandtests/end-to-end/fixtures/modal-visible/test.ts.Fixes #1258